<script setup lang="ts" name="App">
import { watch } from 'vue'
import overallSituation, { LoadStatus } from './stores/overall-situation'
import { awaitSetTimeout } from './utils'

overallSituation.loadGlobalData()

watch(() => overallSituation.loadStatus, async val => {
  if (LoadStatus.fail === val || LoadStatus.success === val) {
    await awaitSetTimeout(1000)
    // #ifdef APP-PLUS
    plus.navigator.closeSplashscreen()
    // #endif
  }
})
</script>